<?php

namespace App\Http\Requests\Admin\GameTool;

use Illuminate\Foundation\Http\FormRequest;
use Auth;

class UserInfoIndexRequest extends FormRequest
{
    public function __construct()
    {

    }

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [];
    }

    public function messages()
    {
        return [];
    }

    protected function prepareForValidation()
    {
        //默认的 区服
        $reqPage = isset($this->page) ? intval($this->page) : 1;
        $reqPageSize = isset($this->page_size) ? intval($this->page_size) : 10;

        $this->merge([
            'page' => $reqPage,
            'page_size' => $reqPageSize,
        ]);
    }
}
